<?php
/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 *
 * @link http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

get_header(); ?>
	<div class="con_1">
		<div class="slider">
			<?php if( function_exists( "get_smooth_slider_recent" ) ){ get_smooth_slider_recent(); } ?>
		</div>	
		<div class="show_1">
			<h4><i></i>今日最新</h4>
			
			<?php query_posts('showposts=8'); ?>
			<ul>
			<?php while (have_posts()) : the_post(); ?>
			<li>
				<span class="tit"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></span>
				<span class="data"><?php the_time('[m-d]');?></span>
			
			</li>
			<?php endwhile;?>
			</ul>
			
		
			
		</div>

		
	</div>
	<div class="con_2">
		<div class="list">
			<ul>
			
			<h4><i></i><?php wp_list_categories('include=4&title_li=&style=none'); ?></h4> 	<!--输出 ID 为11的分类的标题-->
			<?php echo category_description(4); ?> 										<!--输出 ID 为11的分类的描述-->
			<?php query_posts('showposts=5&cat=4'); ?> 		<!--query_posts 给 The Loop 限定的条件是：显示5篇日志和分类 ID 为11-->
			<?php while (have_posts()) : the_post(); ?> 	<!--The Loop 开始-->
			<li>
				<a href="<?php the_permalink() ?>" rel="bookmark" class="title">
					<img src="<?php echo catch_that_image() ?>">
					<span class="tit"><?php the_title(); ?></span>
				</a>
			</li> 					<!--//用列表的方式输出带有链接的文章标题-->
			<?php endwhile; ?> 						<!--//The Loop 结束-->
			
			</ul>
			<div style="clear:both"></div>
		</div>
		<div class="list_2">
			<div class="tx_list">
				<ul>
					<h4><i></i><?php wp_list_categories('include=12&title_li=&style=none'); ?></h4> 
					<?php echo category_description(12); ?> 	
					<?php query_posts('showposts=10&cat=12'); ?>
					
					
					<?php while (have_posts()) : the_post(); ?>
					<li>
						<span class="tit"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a></span>
						<span class="data"><?php the_time('[m-d]');?></span>
					</li>
					<?php endwhile;?>
				</ul>
			</div>
			<div class="tx_list">
				<ul>
					<h4><i></i><?php wp_list_categories('include=13&title_li=&style=none'); ?></h4> 
					<?php echo category_description(13); ?> 	
					<?php query_posts('showposts=10&cat=13'); ?>
					
					
					<?php while (have_posts()) : the_post(); ?>
					<li>
						<span class="tit"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a></span>
						<span class="data"><?php the_time('[m-d]');?></span>
					</li>
					<?php endwhile;?>
				</ul>
			</div>
			<div class="tx_list">
				<ul>
					<h4><i></i><?php wp_list_categories('include=14&title_li=&style=none'); ?></h4> 
					<?php echo category_description(14); ?> 	
					<?php query_posts('showposts=10&cat=14'); ?>
					
					
					<?php while (have_posts()) : the_post(); ?>
					<li>
						<span class="tit"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a></span>
						<span class="data"><?php the_time('[m-d]');?></span>
					</li>
					<?php endwhile;?>
				</ul>
			</div>
			<div class="tx_list">
				<ul>
					<h4><i></i><?php wp_list_categories('include=15&title_li=&style=none'); ?></h4> 
					<?php echo category_description(15); ?> 	
					<?php query_posts('showposts=10&cat=15'); ?>
					
					
					<?php while (have_posts()) : the_post(); ?>
					<li>
						<span class="tit"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a></span>
						<span class="data"><?php the_time('[m-d]');?></span>
					</li>
					<?php endwhile;?>
				</ul>
			</div>
			<div style="clear:both"></div>
		</div>
	
		
	</div>
	<div class="con_3">
		<div class="list_3">
			
			<!--The Loop 开始-->
			<?php
			$categories=get_categories($args);
			foreach($categories as $category) {
				$cc=$category->term_id;
				echo'<h4>';
				echo'<i></i>';
			echo wp_list_categories('include='.$cc.'&title_li=&style=none');
			echo'</h4> ';	
			echo'<ul>';	
			query_posts('showposts=20&cat='.$cc.''); 
			while (have_posts()) : the_post();
			
			echo '<li>';	
			echo '	<a href="';
			echo the_permalink();
			echo'"rel="bookmark" class="title">';
			echo'<img src="';
			echo catch_that_image();
			echo'">';
			echo'<span class="tit">';
			
			
			echo the_title();
			echo'</span>';
			echo '</a>';
			echo '</li>';
			
			endwhile;	
			echo'</ul>	';	
			}
			
			?> 	
			<div style="clear:both"></div>
			
			
			
			
				
		</div>
	</div>
	
	
	
		
	
	
	<div class="friend">
		<h4><i></i>友情链接</h4>
		<ul>
		
		<?php wp_list_bookmarks('title_li=&category_before=&category_after='); ?>
		</ul>
		<div style="clear:both"></div>	
	</div>
	
	

<?php get_footer(); ?>
